﻿<?php
class runtime extends spModel
{
	var $pk = "time_id"; // 每个留言唯一的标志，可以称为主键
	var $table = "runtime"; // 数据表的名称
	//获取某时间段的进程是否在运行
	function s_time($time_id)
	{
		$conditions = "time_id='$time_id'";
		$aaa = $this->findAll($conditions,'','runtime');;
		return $aaa;
	}
	//更新时间段进程的运行时间
	function u_time($time_id)
	{
		$dat_time=strtotime(date("Y-m-d H:i:s"));
//		$this->query("update baomu_runtime set runtime='$dat_time' where time_id='$time_id'");	
		$conditions = "time_id='$time_id'";
		$row = array('runtime'=>$dat_time);
		$this->update($conditions, $row);
	}


}